home *** CD-ROM | disk | FTP | other *** search
/ Micromanía: 150 Juegos 2010 / 150Juegos_16.iso / Shareware / Shape Smash / shape-smash.swf / scripts / Code / WINDOWS / _tc365.as < prev    next >
Encoding:
Text File  |  2010-05-14  |  4.3 KB  |  143 lines

  1. package Code.WINDOWS
  2. {
  3.    import Code.FIELD.helpers.TShapeType;
  4.    import Code.LIB._be548;
  5.    import Code.LIB._cg33;
  6.    import Code.LIB._ct751;
  7.    import Code.LIB._gt710;
  8.    import Code.LIB._my111;
  9.    import Code.LIB._oo505;
  10.    import Code.LIB._tk11;
  11.    import Code.LIB._vx23;
  12.    import Code.OPTIONS.LEVELS;
  13.    import Code.OPTIONS._gs337;
  14.    import Code._fi197;
  15.    import flash.display.Sprite;
  16.    import flash.events.Event;
  17.    import flash.events.MouseEvent;
  18.    
  19.    public class _tc365 extends _gt710
  20.    {
  21.       public static const stNone:int = 0;
  22.       
  23.       public static const stMove:int = 1;
  24.       
  25.       public var iFrameS:_be548;
  26.       
  27.       public var iFrame:_oo505;
  28.       
  29.       private var iState:int;
  30.       
  31.       private var iTopY:Number = 0;
  32.       
  33.       private var iMode:TShapeType;
  34.       
  35.       private var iBottomY:Number = 50;
  36.       
  37.       private var iButC:_ct751;
  38.       
  39.       private var iButR:_ct751;
  40.       
  41.       public function _tc365(param1:Boolean = false)
  42.       {
  43.          var _loc2_:String = null;
  44.          var _loc3_:String = null;
  45.          var _loc4_:Array = null;
  46.          var _loc5_:_oo505 = null;
  47.          iTopY = 0;
  48.          iBottomY = 50;
  49.          if(_vx23._xp514)
  50.          {
  51.             _loc2_ = _gs337.iLanguage.strFinished;
  52.          }
  53.          else
  54.          {
  55.             _loc2_ = _gs337.iLanguage.strLevel + " " + int(_cg33._ss555[1].prRoundzLevel + 1) + "/" + LEVELS.RoundzLevels.length;
  56.          }
  57.          if(_vx23._bu14)
  58.          {
  59.             _loc3_ = _gs337.iLanguage.strFinished;
  60.          }
  61.          else
  62.          {
  63.             _loc3_ = _gs337.iLanguage.strLevel + " " + int(_cg33._ss555[1].prBlockzLevel + 1) + "/" + LEVELS.BlockzLevels.length;
  64.          }
  65.          _loc4_ = [[_fi197._ww533,_gs337.cGellGreen,350,120,false,30,40,null,true],[_fi197._ww533,_gs337.cWhite,330,50,true,40,50,"iFrame",true],[_fi197._cx181,param1 ? _gs337.iLanguage.strChangeMode : _gs337.iLanguage.strSelectMode,_gs337.TColors,30,_my111.BigText,30,0,null,true],[_fi197._cx181,_gs337.iLanguage.strRoundz + "   (" + _loc2_ + ")",_gs337.TColors,35,_my111.BigText,170,55,null,true],[_fi197._cx181,_gs337.iLanguage.strSquarez + "   (" + _loc3_ + ")",_gs337.TColors,35,_my111.BigText,170,105,null,true]];
  66.          _loc5_ = _tk11._ln87(new _gs337.TGSelectMode() as Sprite,0.85);
  67.          _loc5_._xe768(45,50);
  68.          addChild(_loc5_);
  69.          super(_loc4_);
  70.          iButC = new _ct751(null,null,false,320,45);
  71.          iButR = new _ct751(null,null,false,320,45);
  72.          iButC._xe768(40,50);
  73.          iButR._xe768(40,100);
  74.          iFrameS = new _be548();
  75.          iFrameS.addChild(iFrame);
  76.          addChildAt(iFrameS,0);
  77.          _kd700(_vx23._un44);
  78.          iFrameS._vg471 = iMode == TShapeType.CIRCLE ? iTopY : iBottomY;
  79.          if(!_vx23._xp514)
  80.          {
  81.             addChild(iButC);
  82.          }
  83.          if(!_vx23._bu14)
  84.          {
  85.             addChild(iButR);
  86.          }
  87.       }
  88.       
  89.       override public function _fl204(param1:MouseEvent) : void
  90.       {
  91.          if(param1.target == iButC._en365)
  92.          {
  93.             _kd700(TShapeType.CIRCLE);
  94.          }
  95.          else if(param1.target == iButR._en365)
  96.          {
  97.             _kd700(TShapeType.POLY);
  98.          }
  99.       }
  100.       
  101.       public function _kd700(param1:TShapeType) : void
  102.       {
  103.          iMode = param1;
  104.          iState = stMove;
  105.          _cg33._ss555[1].prShapeType = iMode == TShapeType.CIRCLE ? 0 : 1;
  106.          _cg33._gk638();
  107.       }
  108.       
  109.       override public function onEnterFrame(param1:Event) : void
  110.       {
  111.          super.onEnterFrame(param1);
  112.          switch(iState)
  113.          {
  114.             case stMove:
  115.                if(iMode == TShapeType.CIRCLE)
  116.                {
  117.                   iFrameS._vg471 -= 5;
  118.                   if(iFrameS._vg471 <= iTopY)
  119.                   {
  120.                      iFrameS._vg471 = iTopY;
  121.                      iState = stNone;
  122.                   }
  123.                }
  124.                else
  125.                {
  126.                   iFrameS._vg471 += 5;
  127.                   if(iFrameS._vg471 >= iBottomY)
  128.                   {
  129.                      iFrameS._vg471 = iBottomY;
  130.                      iState = stNone;
  131.                   }
  132.                }
  133.          }
  134.       }
  135.       
  136.       public function get _un44() : TShapeType
  137.       {
  138.          return iMode;
  139.       }
  140.    }
  141. }
  142.  
  143.